package ats.org.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author ghanem
 */
@Entity
@Table(name = "SIS_SCIENTIFIC_DEGREES")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "SisScientificDegree.findAll", query = "SELECT s FROM SisScientificDegree s"),
    @NamedQuery(name = "SisScientificDegree.findByDegreeCode", query = "SELECT s FROM SisScientificDegree s WHERE s.degreeCode = :degreeCode")})
public class SisScientificDegree implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "DEGREE_CODE")
    private Short degreeCode;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 30)
    @Column(name = "DEGREE_DESC")
    private String degreeDesc;
    @Size(max = 30)
    @Column(name = "DEGREE_DESC_S")
    private String degreeDescS;
    @Basic(optional = false)
    @NotNull
    @Column(name = "DEGREE_SEQ")
    private short degreeSeq;
    @Basic(optional = false)
    @NotNull
    @Column(name = "IS_GRADUATED")
    private short isGraduated;
    @Column(name = "ALTERNATIVE_DEGREE")
    private Short alternativeDegree;
    @Basic(optional = false)
    @NotNull
    @Column(name = "IS_RESTRICTED_ALTERNATIVE")
    private short isRestrictedAlternative;
    @Column(name = "MOHE_DEGREE_CODE")
    private Short moheDegreeCode;

    public SisScientificDegree() {
    }

    public SisScientificDegree(Short degreeCode) {
        this.degreeCode = degreeCode;
    }

    public SisScientificDegree(Short degreeCode, String degreeDesc, short degreeSeq, short isGraduated, short isRestrictedAlternative) {
        this.degreeCode = degreeCode;
        this.degreeDesc = degreeDesc;
        this.degreeSeq = degreeSeq;
        this.isGraduated = isGraduated;
        this.isRestrictedAlternative = isRestrictedAlternative;
    }

    public Short getDegreeCode() {
        return degreeCode;
    }

    public void setDegreeCode(Short degreeCode) {
        this.degreeCode = degreeCode;
    }

    public String getDegreeDesc() {
        return degreeDesc;
    }

    public void setDegreeDesc(String degreeDesc) {
        this.degreeDesc = degreeDesc;
    }

    public String getDegreeDescS() {
        return degreeDescS;
    }

    public void setDegreeDescS(String degreeDescS) {
        this.degreeDescS = degreeDescS;
    }

    public short getDegreeSeq() {
        return degreeSeq;
    }

    public void setDegreeSeq(short degreeSeq) {
        this.degreeSeq = degreeSeq;
    }

    public short getIsGraduated() {
        return isGraduated;
    }

    public void setIsGraduated(short isGraduated) {
        this.isGraduated = isGraduated;
    }

    public Short getAlternativeDegree() {
        return alternativeDegree;
    }

    public void setAlternativeDegree(Short alternativeDegree) {
        this.alternativeDegree = alternativeDegree;
    }

    public short getIsRestrictedAlternative() {
        return isRestrictedAlternative;
    }

    public void setIsRestrictedAlternative(short isRestrictedAlternative) {
        this.isRestrictedAlternative = isRestrictedAlternative;
    }

    public Short getMoheDegreeCode() {
        return moheDegreeCode;
    }

    public void setMoheDegreeCode(Short moheDegreeCode) {
        this.moheDegreeCode = moheDegreeCode;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (degreeCode != null ? degreeCode.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SisScientificDegree)) {
            return false;
        }
        SisScientificDegree other = (SisScientificDegree) object;
        if ((this.degreeCode == null && other.degreeCode != null) || (this.degreeCode != null && !this.degreeCode.equals(other.degreeCode))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.ats.edugate.model.entities.SisScientificDegrees[ degreeCode=" + degreeCode + " ]";
    }
    
}
